Aim
To adjust settings in a Basler GigE camera or USB 3.0 camera, like the video frame rate, video frame resolution, and exposure time, within the camera software.
▪You can also change most of these settings within EthoVision XT. See Adjust camera settings in EthoVision XT
▪important Do not use pylon Viewer to record video! Always use EthoVision XT or MediaRecorder.
Main actions
▪Adjust the camera exposure time
▪Do a factory reset on the Basler GigE camera
1.Make sure EthoVision XT (and MediaRecorder, when present on the computer) are not running.
2.In the Apps screen, choose Basler > pylon Viewer.
pylon Viewer is installed only if you selected to install the Basler camera drivers during installation of EthoVision XT. See Install EthoVision XT
3.From the Windows menu of pylon Viewer select Features - All.
4.In the Devices panel, double-click the item Basler under GigE or USB depending on the camera you have.
If an error message Failed to download... appears, it is probably caused by the mismatch between IP addresses of camera and Ethernet interface. Adjust the IP addresses and when ready click the Refresh button in pylon Viewer. See Assign IP addresses
5.To preview the camera image, click the Continuous Shot button on the toolbar.
important Do not use the Record button if you want to record video! This creates very large files. Always use EthoVision XT record video.
6.Under Features - All, expand the camera name and choose the settings category that you would like to adjust. See the instructions that apply in the following sections.
note To be able to adjust the settings, click the Stop button first.
7.After you have adjusted the camera settings, save them under Configuration Sets. See Save the camera settings
8.When working with multiple cameras, repeat the procedure for each camera.
1.In the Features panel, open the Basler camera item and then the AOI Controls item (Image Format Control for USB 3.0 cameras).
2.You can set the resolution by adjusting the Width and the Height.
▪Recommended: 1280 x 960 or 1280 x 1024.
▪When using multiple cameras you may need to limit the resolution, also depending on the frame rate and the tracking methods you intend to use. See suggestions for GigE cameras and USB 3.0 cameras
3.Save the settings. See Save the camera settings
1.In the Features panel, under Category, open the camera item and then click Acquisition Controls.
2.Select Enable Acquisition Frame Rate.
3.Next to Acquisition Frame Rate (Abs) [Hz], enter the frame rate you require (frames per second).
4.To check that the frame rate is stable, click the Continuous Shot button on the toolbar.
Under the live video window, locate the resulting frame rate. This is the frame rate that the camera can sustain with the current settings. Check that this matches the value you have just set.
Follow this procedure to make sure the camera view is centered. Alternatively, you can use part of the original camera image by operating the Offset controls.
1.In the Features panel, open the Basler camera item and then the AOI Controls item (Image Format Control for USB 3.0 cameras).
2.Select both options Center X and Center Y.
note If you want to have the camera image off center, for example to focus on one region of interest, do the following in pylon Viewer:
1.Under Features > AOI Controls de-select Center X and Center Y.
2.Click the Stop button.
3.De-select Center X and/or Center Y.
4.If the Width and Height of the image are set to the maximum values, reduce those values so you have room for the offset adjustment (see below).
5.Move the X Offset and Y Offset sliders.
6.Click the Continuous shot button and check the live camera view.
7.When you are satisfied with the new off-center camera view, Save the camera settings. For more details, see the camera documentation.
Pixel format is the format in which video data sent out by the camera sensor is represented and analyzed by EthoVision XT.
1.Click the Stop button.
2.In the Features panel, under Category, open the camera item and then click Image Format Controls.
3.Select the Pixel Format:
▪For monochrome cameras, choose Mono 8.
▪For color cameras, choose Bayer RG 8. See also Settings for the color camera
important Mono 8 corresponds to the option Y800 in EthoVision XT. See Adjust camera settings in EthoVision XT > Format tab.
Adjust the camera exposure time
The exposure time (or shutter time) is the time the camera shutter is kept open to let light in. The exposure time limits the maximum achievable frame rate. If the sum of the exposure time and the time needed for reading the chip (readout time) is greater than the time between consecutive video frames, the next frame may be dropped, resulting in a lower frame rate, and missed samples during tracking.
To adjust camera exposure that matches a frame rate:
1.In the Features panel, under Category, open the camera item and then click Acquisition Controls.
2.Make sure that Exposure Mode is Timed, and Exposure Auto is Off.
3.Next to Exposure Time (Abs) [us], enter the exposure time you require, in microseconds.
▪For Zebrafish larvae, enter 4000 or 2000, depending on the video resolution chosen. If resolution in EthoVision is 1280 x 960 or similar, select 4000. If the resolution is 640 x 480 or similar, select 2000.
▪In all other cases, you may choose a higher value. The ideal range of exposure will likely be anywhere from 2000 to 10,000.
▪If lighting in the room is low, you will likely need a longer exposure time. Try 8000 up as high as 15000. When tracking under infrared light, you generally need to set high Exposure times, up to 20000.
▪Values higher than 20000 are not recommended - increase illumination or set the Gain a bit higher. See Adjust the camera gain
▪Note that a longer exposure time may cause motion blur. Faster animals like flying insects require shorter exposure times than other, slow-moving animals. In case of motion blur, reduce exposure time and compensate this by opening the lens aperture and/or increasing the amount of ambient light (the latter is preferred).
4.A longer exposure time may conflict with the time that the software needs to process an image, because both must fit within the time between two successive video images. In that case some video images may be dropped during acquisition. To check that the exposure time is compatible with the frame rate you have chosen, click the Continuous Shot button on the toolbar.
At the bottom of the live video window, locate the frame rate resulting with the new exposure time. If the camera can cope with the new exposure time, the current frame rate should be the same as that set next to Acquisition Frame Rate (Abs) [Hz]. This is usually 25, 30 or 60.
If the exposure time is very high, the resulting frame rate could be lower than the set frame rate Acquisition Frame Rate (Abs) [Hz].
For example, setting an Exposure time of 40000 (40 ms) reduces the frame rate from 25 to 20:
To solve this, do one of the following:
▪Under Acquisition Controls, lower the Exposure Time (Raw). This makes the video image darker. To compensate for that, open the lens diaphragm so that the camera sensor receives more light. Note, however, that an open diaphragm reduces the depth of field, that is, the range of distances where the object appear sharp in the camera image.
▪Under AOI Controls, lower the Width and Height (video resolution). Do this until you see the expected frame rate under the live view.
Camera gain amplifies the video signal. A higher value of gain results in a brighter image. That could be an option whenever the image is too dark for EthoVision XT to detect a subject, and you do not have other ways to correct for that. For example, when the lens of the camera is wide open and you cannot increase light intensity in the test room.
tip Whenever possible, add lights instead of increasing camera gain. See Lighting setup and the video tutorial Set up Your Test Environment (Help > Video Tutorial).
1.Start the live view by clicking the Continuous Shot button.
2.In the Features panel, click Analog Control.
3.From the Gain Auto list, select Off.
4.Next to Gain (Raw), select the value you require.
In normal situations values like 0 or 1 should suffice. Only increase the gain further if there is no other way to get a bright image (e.g. by increasing the exposure time, or improving the ambient light, or opening the aperture ring of the lens). However, increasing gain results in more image noise.
5.Check the live view and adjust the gain when necessary.
6.When ready, Save the camera settings.
If you have a color camera, you also need to adjust its white balance.
1.Click Color Improvements Control.
2.Point the camera at a piece of white paper, so that the camera image looks entirely white. Click in the field next to Balance White Auto and select Once from the list.
3.Save the settings (see below). See also Settings for the color camera
important If you have multiple GigE/USB 3.0 cameras, make sure that you save the settings for each camera. To select a camera, double-click its name in the Device panel in pylon Viewer, adjust the settings that you require and repeat the procedure to save the settings.
1.Click the Stop button.
2.In the Features panel, click Configuration Sets (User Set Control for USB 3.0 cameras).
3.From the Configuration Set Selector list (User Set Selector for USB 3.0 cameras), select User Set 1.
4.Next to User Set Save, click Execute. The camera settings are saved under User Set 1.
5.From the Default Startup Set list (User Set Default for USB 3.0 cameras), select User Set 1. This means that the camera always starts with the settings contained in User Set 1.
6.Close pylon Viewer.
These settings will be used each time you start up EthoVision XT.
tip You can also save different settings for the same camera in User Set 2 and User Set 3. Under Default Startup Set/User Set Default, select which you want EthoVision to use.
Do a factory reset on the Basler GigE camera
1.Open pylon Viewer and double-click the camera name. At the bottom left of the interface, click All Features.
2.In the Features window, expand Configuration Sets.
3.For Configuration Set Selector, select Default Configuration Set.
4.For Default Startup Set, select Default User Set.
5.For User Set Save, click the Execute button.
6.For User Set Load, click the Execute button.
7.The camera should now be reset to factory defaults.
At this point you need to set the resolution, frame rate, exposure and other settings while still in pylon Viewer. See the top of this topic. Finally, save the settings with a specific name (e.g. User Set 1) so you can always return to those settings (User Set Load) when needed.